local player = owner local character = player.Character local Debris = game:GetService("Debris") local sword = Instance.new("Tool", player.Backpack) sword.Name = "Sword" sword.Grip = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) local handle = Instance.new("Part", sword) handle.Name = "Handle" handle.Size = Vector3.new(1, 0.8, 4) local mesh = Instance.new("SpecialMesh", handle) mesh.MeshId = "rbxasset://fonts/sword.mesh" mesh.TextureId = "rbxasset://textures/SwordTexture.png" local swordSlash = Instance.new("Sound", handle) swordSlash.Name = "SwordSlash" swordSlash.SoundId = "http://www.roblox.com/asset/?id=12222216" local swordLunge = Instance.new("Sound", handle) swordLunge.Name = "SwordLunge" swordLunge.SoundId = "http://www.roblox.com/asset/?id=12222208" local unsheath = Instance.new("Sound", handle) unsheath.Name = "Unsheath" unsheath.SoundId = "http://www.roblox.com/asset/?id=12222225" local SLASH_DAMAGE = 2.5 local SPECIAL_DAMAGE = 7.5 local slashing = false local specialUsing = false local function slash() if slashing == false then slashing = true sword.Handle.SwordSlash:Play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = sword task.wait(0.5) slashing = false end end local function special() if slashing == true then if specialUsing == false then specialUsing = true sword.Handle.SwordLunge:Play() sword.Grip = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1) local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = sword local velocity = Instance.new("BodyVelocity", sword.Parent.HumanoidRootPart) velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) velocity.Velocity = velocity.Parent.CFrame.LookVector * 35 Debris:AddItem(velocity, 0.3) task.wait(0.7) sword.Grip = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) task.wait(0.3) specialUsing = false end end end local function unsheath() sword.Handle.Unsheath:Play() end local function damage(part) if slashing == true then if specialUsing == true then local humanoid = part.Parent:FindFirstChildWhichIsA("Humanoid") if humanoid then humanoid:TakeDamage(SPECIAL_DAMAGE) end end else local humanoid = part.Parent:FindFirstChildWhichIsA("Humanoid") if humanoid then humanoid:TakeDamage(SLASH_DAMAGE) end end end sword.Activated:Connect(slash) sword.Activated:Connect(special) sword.Equipped:Connect(unsheath) handle.Touched:Connect(damage)